package com.jingming.consult.videoplayer;

import android.content.Context;
import android.graphics.Color;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jingming.consult.R;

import java.util.List;

/**
 * 直播清晰度的RecycleView的适配器
 */
public class LiveChangeAdapter extends BaseQuickAdapter<CollegeGetShfeUrlBean.Urls, BaseViewHolder> {

    private List<CollegeGetShfeUrlBean.Urls> datas;
    private Context context;

    public LiveChangeAdapter(Context context, @Nullable List<CollegeGetShfeUrlBean.Urls> datas) {
        super(R.layout.item_live_change, datas);
        this.datas = datas;
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, CollegeGetShfeUrlBean.Urls datasBean) {

        TextView tv_item_change = baseViewHolder.getView(R.id.tv_item_change);
        tv_item_change.setText(datasBean.getName());
        if (datasBean.isSelected()) {
            tv_item_change.setTextColor(Color.parseColor("#ff0c95ff"));
        } else {
            tv_item_change.setTextColor(Color.parseColor("#CCCCCCFF"));
        }
    }

}
